

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="sj" tagdir="/WEB-INF/tags/spring-jquery-tags"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<script type="text/javascript">
	$(document).ready(function(){
		$('table.tablesorter').tablesorter({widgets: ['zebra'], sortList: [[0,0], [1,0]], headers: { 3: { sorter: false}, 4: {sorter: false} }});
		
		$('.edit-donor-link').click(function(){
			loadDiv('content', 'showEditDonor.do?id='+$(this).attr('donorId'));
		});
	});
</script>	

<div id="donorListDiv" class="hastable">
	<table class="tablesorter">
		<thead>
			<tr>
				<th><spring:message code="donorlist.table.heading.name"/></th>
				<th><spring:message code="donorlist.table.heading.acronym"/></th>
				<th><spring:message code="donorlist.table.heading.url"/></th>
				<th><spring:message code="donorlist.table.heading.viewAward"/></th>
				<th><spring:message code="donorlist.table.heading.edit"/></th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${donors}" var="donor">
				<tr>
					<td>${donor.name}</td>
					<td>${donor.acronym}</td>
					<td><a href="${donor.url}" target="_blank">${donor.url}</a></td>
					<td><a href="javascript://" class="view-awards-link" donorId="${donor.id}"><spring:message code="donorlist.table.link.viewAward"/></a></td>
					<td><a href="javascript://" class="edit-donor-link" donorId="${donor.id}"><spring:message code="donorlist.table.link.edit"/></a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<div id="donorListPager"></div>
</div>


